home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Suzy B Software 2
/
Suzy B Software CD-ROM 2 (1994).iso
/
prntutil
/
mfprint
/
mfprint.doc
< prev
next >
Wrap
Text File
|
1995-04-25
|
7KB
|
179 lines
=======================================================================
GMFPRINT.DOCH December 23, 1986
Pat Warnshuis, Portland (OR) Atari Club
1-503-246-3724
=======================================================================
MFPRINT is a multifile print program and is intended to complement the
PROED program editor by Jerry Cole. It is most effective when used in
conjunction with a good print spooler.
MFPRINT runs as a tos-takes-parameters task, either from the GEM desktop
or from a shell command line.
MFPRINT lists the files entered at the TTP prompt in a continuous print
task, inserting formfeeds between the individual file listings.
Each page is started with an optional header which lists the time, date,
filename and page number. The user can turn off paging and headers to
list pre-formatted files.
Condensed print can be selected over the default elite print.
The left margin and Tabs can be set to any number of spaces.
The user can change the switch settings between individual file listings.
Individual or all listings can be aborted at any keyboard entry or
anytimethe program is attempting to print a character (whether the
printer is on-line or off-line).
USAGE:
======
The files to be printed are entered at the TTP prompt. Command line
entries can be in either upper or lower case, or mixed.
More than one file can be listed at a time with an optional comma
between the filenames:
mfprint mypride.c mypride.h mypride.doc
mfprint mypride.c, mypride.h, mypride.doc
Each filename can include wildcards:
mfprint mypride.*, mypride*.c, *.c, b:\pathname\*.h
The switches are:
e elite print (default)
c condensed print (default = elite)
p paging OFF (default = ON)
h headers OFF (default = ON)
tn tab on modulus n spaces (default = 8)
ln left margin n spaces
Switch option strings are preceded by a '-' character. Spaces are not
allowed between the individual switches. However, they may be separated
with optonal commas. Normally, the filenames are followed a single set
of switches which apply to all the files:
mfprint file1 file2 -cht4l20
mfprint file1 file2 -c,h,t4,l20
The switch settings can be changed between files:
mfprint -c,t4 file1 -e,p,h file2
mfprint file1 file2 -ph file3 -c,l12
In the second example, the switches -cl,12 woud apply to file1
and file2, while the switches -ph would apply to file3.
If an error is made in the command line entry, the program will prompt
for a new entry. It will keep trying to process the switches or to open
and list a file until either it is successful or the user aborts.
If prompted for a new filename, the user can force a directory listing
by typing any wildcard entry:
b: b:*.c b:\pathname\ b:fname.*
The user can abort the program at any keyboard prompt or anytime the
program is listing a file (whether the printer is on or off). The abort
character is a control_C (selected by tradition and to require an
two-key entry). The current line will be completed before the listing
is aborted. If you are using a print spooler and the files have already
been loaded into the spooler's buffer, the spooler must be able to flush
its buffer and abort the listing.
FEATURES:
=========
The default values provide a one-inch margin at the top, bottom, and
left margins. The right margin is set to the right edge of the page
whether elite or condensed print is invoked. If a line length exceeds
the right margin, the program will break the line and continue that
line at the left margin.
Elite print was selected for the default as it conveniently corresponds
to an 80-column screen. This works for source listings and for many
documentation files which are pre-formatted to a screen width. For
assembler output listings, where the assembler adds object code data
to the left of the listing, the user can select condensed print.
The user can turn off both program-controlled paging and the listing
of a header at the start of each page. This permits printing files
which have been pre-formatted.
The header is printed justified against the right margin to minimize
interference with the listing. If the header flag is turned off by
the user, the top margin is still maintained at one-inch.
Lines in the print file can be terminated with either '\n' or CRLF.
The <escape> character is passed to the printer so that embedded print
control codes can be sent. (Embed the control characters in a comment
line to placate the assembler or compiler.)
If a formfeed is encountered, it is delayed until the end of the
current print line. Normally formfeeds can only be embedded in
comments for an assembler or a compiler. This feature keeps the
comment line from being split across the pages.
At the start of each file listing, the program displays on the console
the filename and filesize.
The program dynamically allocates memory for each file as it lists
that file and frees that memory when the file listing is completed.
It also tries to allocate sufficient memory to read the file in a
single Fread to minimize grind and wear on the floppies. If there
is not enough free memory to handle the list file in a single buffer,
the program optimizes the block size to minimize the number of disk
accesses required.
MODIFICATIONS:
==============
All progam constants and defaults are listed in the MFPRINT.H file.
The program uses only five printer controls: elite and condensed print,
bold-on, bold-off, and formfeed. The default settings are for an
Epson FX-80 printer. The printer controls are the first entries in the
.h file. If your printer controls differ, merely change these settings
and recompile the program. If your printer does not have a specific control,
enter a null string for that setting. The individual control functons are
only lace-curtain features and are not essential to the multifile listings.
The program compiles and links as a stand-alone module. It was developed
under Megamax C but uses no special features of that implementation.
If you compile under another compiler, note the use of <...> and "..."
in the #include statements in the MFPRINT.C listing. Your compiler
may use a different convention for accessing its library and user files.
AGENDA:
=======
Convert the program to a print spooler. As of Dec 17 86, the spooler
works ok as a stand-alone program but I want to incorporate it into
mfprint.acc to take advantage of the dynamic memory allocation.
The spooler should spool qued files to a working disk file to minimize the
size requirements of the print buffer and to permit deleting files from
the que.
PUBLIC DOMAIN RESTRICTONS:
==========================
MFPRINT is released to the public domain for the use of hobbyists in
any non-commercial application. It may be freely distributed to other
hobbyists or bulletin boards.
Please do not modify and redistribute this program under the name of
MFPRINT. If you wish to change or to add features, please contact me
at either the address below or on CIS, 70370, 722. I check into the
Atari Developers' Forem several times each week.